Bootstrapping Traits

نویسنده

  • Adrian Lienhard
چکیده

Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the variants – single inheritance, multiple inheritance, and mixin inheritance – all suffer from conceptual and practical problems. Traits overcome the problems arising with the different variants of inheritance. Traits are essentially groups of methods that serve as building blocks for classes and are primitive units of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. This thesis discusses the implementation of traits. The result it presents is a new Smalltalk kernel bootstrapped with traits. The implementation is fully done in Squeak [INGA 97], an open-source dialect of Smalltalk. It is planned that the next generation of Squeak will include traits. Because traits are simple and completely backward compatible with single inheritance, implementing traits in a reflective single inheritance language like Squeak is unproblematic. However, an implementation with a sophisticated and clean design, with the robustness to be used in production and the flexibility to be used as a vehicle for future research, is not trivial. Furthermore our work is aimed at serving as a reference implementation for the introduction of traits in other languages. Hence, we focused on building a simple but powerful system for the future. Consequently following the fundamental idea of a reflective language – using the features of the language to define the behavior of the language itself – we bootstrapped the new kernel which, eventually, allowed us to fully express the system itself with traits. The refactoring of the core of the Smalltalk language as a composition of traits not only improved its quality but also enhanced its understandability. This has the advantage that it is easier maintainable and it facilitates experimentation with the language because the different aspects of the kernel are now available as traits and can therefore be recomposed to create new kernel classes with different properties.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Determining the effective dimensionality of the genetic variance-covariance matrix.

Determining the dimensionality of G provides an important perspective on the genetic basis of a multivariate suite of traits. Since the introduction of Fisher's geometric model, the number of genetically independent traits underlying a set of functionally related phenotypic traits has been recognized as an important factor influencing the response to selection. Here, we show how the effective d...

متن کامل

Traits Composing Classes from Behavioral Building Blocks

Inheritance is well-known and accepted as a fundamental mechanism for reuse in object-oriented languages. Unfortunately, the main variants — single inheritance, multiple inheritance, and mixin inheritance — all suffer from conceptual and practical problems related to software reuse and robustness with respect to changes. In a first part of this thesis, we identify and illustrate these problems....

متن کامل

Modeling Multiple Responses via Bootstrapping Margins with an Application to Genetic Association Testing.

The need for analysis of multiple responses arises from many applications. In behavioral science, for example, comorbidity is a common phenomenon where multiple disorders occur in the same person. The advantage of jointly analyzing multiple correlated responses has been examined and documented. Due to the difficulties of modeling multiple responses, nonparametric tests such as generalized Kenda...

متن کامل

Positive Traits Linked to Less Pain through Lower Pain Catastrophizing.

The present study examined the association between positive traits, pain catastrophizing, and pain perceptions. We hypothesized that pain catastrophizing would mediate the relationship between positive traits and pain. First, participants (n = 114) completed the Trait Hope Scale, the Life Orientation Test- Revised, and the Pain Catastrophizing Scale. Participants then completed the experimental...

متن کامل

Complexity versus certainty in understanding species’ declines

Methods We used the breeding birds of the grassland to test the relationship between species declines and a suite of traits associated with decline (such as size, specialization and rarity, as well as distance to edge of a discontinuity, and edge of geographic range) in a stepwise regression with AICc values and bootstrapping via model averaging, followed by a refit procedure to obtain model-av...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004